#include <signal.h>
#include <iostream>
#include <QApplication>
#include "mainwindow.h"

void trapit(int sig)
{
    signal(SIGPIPE, trapit);
}

int main(int argc, char *argv[])
{
    if( Qx3Model::getInstance()->setupVideo("/dev/video1", "/proc/cpia/video1") < 0 ) {
       // std::cerr << "could not initialize the video system" << std::endl;
            return -1;
    }
    else {

        QApplication a(argc, argv);
       // signal(SIGPIPE,trapit);
        MainWindow w;
        w.show();
        return a.exec();
    }
}
